<?php

return array(
    'router' => array(
        'routes' => array(
            'home' => array(
                'type' => 'Literal',
                'options' => array(
                    'route'    => '/',
                    'defaults' => array(
                        'controller' => 'Site\Controller\Site',
                        'action'     => 'index',
                    ),
                ),
            ),
            /* user controller part start */
            'user' => array(
                'type'    => 'Segment',
                'options' => array(
                    'route'    => '/user[/:page]',
                    'constraints' => array(
                        'page'         => '[0-9]+',
                    ),
                    'defaults' => array(
                        'controller'    => 'User\Controller\User',
                        'action'        => 'index',
                        'page'          => 1,
                    ),
                ),
                'may_terminate' => true,
                'child_routes' => array(
                    'login' => array(
                        'type' => 'Segment',
                        'options' => array(
                            'route' => '/login',
                            'defaults' => array(
                                'action'     => 'login',
                            ),
                        ),
                    ),
                    'logout' => array(
                        'type' => 'Segment',
                        'options' => array(
                            'route' => '/logout',
                            'defaults' => array(
                                'action'     => 'logout',
                            ),
                        ),
                    ),
                    'add' => array(
                        'type' => 'Segment',
                        'options' => array(
                            'route' => '/add',
                            'defaults' => array(
                                'action'     => 'add',
                            ),
                        ),
                    ),
                    'save' => array(
                        'type' => 'Segment',
                        'options' => array(
                            'route' => '/save',
                            'defaults' => array(
                                'action'     => 'save',
                            ),
                        ),
                    ),
                    'edit' => array(
                        'type' => 'Segment',
                        'options' => array(
                            'route' => '/edit[/:id]',
                            'constraints' => array(
                                'id'         => '[0-9]+',
                            ),
                            'defaults' => array(
                                'action'     => 'edit',
                            ),
                        ),
                    ),
                    'delete' => array(
                        'type' => 'Segment',
                        'options' => array(
                            'route' => '/delete[/:id]',
                            'constraints' => array(
                                'id'         => '[0-9]+',
                            ),
                            'defaults' => array(
                                'action'     => 'delete',
                            ),
                        ),
                    ),
                    'lang' => array(
                        'type' => 'Segment',
                        'options' => array(
                            'route' => '/lang[/:lang]',
                            'constraints' => array(
                                'lang'         => '[a-zA-Z_]+',
                            ),
                            'defaults' => array(
                                'action'     => 'lang',
                            ),
                        ),
                    ),
                ),
            ),
            /* user controller part end */
        ),
    ),
);